# plotly standard imports
import plotly.graph_objs as go
import chart_studio.plotly as py
# Cufflinks wrapper on plotly
import cufflinks
# Data science imports
import pandas as pd
import numpy as np
# Options for pandas
pd.options.display.max_columns = 30
# Display all cell outputs
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = 'all'
from plotly.offline import iplot, init_notebook_mode
cufflinks.go_offline(connected=True)
init_notebook_mode(connected=True)
# Set global theme
cufflinks.set_config_file(world_readable=True, theme='pearl')
import os
import mlflow
trackng_url = os.getenv('MLFLOW_TRACKING_URI')
print(trackng_url)
mlflow.set_tracking_uri(trackng_url)
http://mlflow:5000
from src.prepare_datasets import get_prepared_datasets
# five minute dataset
train, test = get_prepared_datasets()
train
| timestamp | open | high | low | close | volume | volatility_bbm | volatility_bbh | volatility_bbl | trend_macd | momentum_rsi | volatility_kchi | trend_ichimoku_conv | trend_ichimoku_a | trend_ichimoku_b | momentum_stoch | momentum_stoch_signal | volatility_atr | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 2016-08-10 15:53:00 | 0.000158 | 0.000156 | 0.000158 | 0.000156 | 0.000149 | 0.000773 | 0.000717 | 0.000860 | 0.557937 | 1.000000 | 0.0 | 0.000791 | 0.000777 | 0.000744 | 0.500000 | 0.500000 | 0.000000 |
| 1 | 2016-08-10 15:59:00 | 0.000417 | 0.000415 | 0.000375 | 0.000415 | 0.041003 | 0.001443 | 0.002706 | 0.000186 | 0.560160 | 1.000000 | 1.0 | 0.001459 | 0.001447 | 0.001417 | 1.000000 | 1.000000 | 0.000000 |
| 2 | 2016-08-10 16:04:00 | 0.000495 | 0.000495 | 0.000490 | 0.000495 | 0.026081 | 0.001804 | 0.003219 | 0.000392 | 0.562563 | 1.000000 | 1.0 | 0.001667 | 0.001655 | 0.001626 | 0.998519 | 0.999259 | 0.000000 |
| 3 | 2016-08-10 16:09:00 | 0.000495 | 0.000495 | 0.000492 | 0.000495 | 0.050928 | 0.001985 | 0.003343 | 0.000631 | 0.564397 | 1.000000 | 1.0 | 0.001667 | 0.001655 | 0.001626 | 1.000000 | 0.999506 | 0.000000 |
| 4 | 2016-08-10 16:14:00 | 0.000470 | 0.000468 | 0.000463 | 0.000463 | 0.001854 | 0.002060 | 0.003300 | 0.000824 | 0.565480 | 0.893887 | 1.0 | 0.001667 | 0.001655 | 0.001626 | 0.903704 | 0.967407 | 0.000000 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 363254 | 2020-04-22 12:16:00 | 0.064202 | 0.064200 | 0.064156 | 0.064156 | 0.000249 | 0.332335 | 0.330019 | 0.333521 | 0.558528 | 0.420486 | 0.0 | 0.331758 | 0.332473 | 0.334215 | 0.003448 | 0.336163 | 0.018243 |
| 363255 | 2020-04-22 12:21:00 | 0.064201 | 0.064199 | 0.064176 | 0.064174 | 0.000145 | 0.332314 | 0.330029 | 0.333469 | 0.557445 | 0.432412 | 0.0 | 0.331758 | 0.332473 | 0.334215 | 0.065517 | 0.071695 | 0.017497 |
| 363256 | 2020-04-22 12:26:00 | 0.064178 | 0.064177 | 0.064168 | 0.064177 | 0.000190 | 0.332315 | 0.330027 | 0.333474 | 0.556628 | 0.434500 | 0.0 | 0.331758 | 0.332473 | 0.334215 | 0.075862 | 0.048276 | 0.016023 |
| 363257 | 2020-04-22 12:31:00 | 0.064219 | 0.064228 | 0.064218 | 0.064223 | 0.000019 | 0.332328 | 0.330017 | 0.333510 | 0.556401 | 0.466894 | 0.0 | 0.331758 | 0.332473 | 0.334215 | 0.234483 | 0.125287 | 0.015699 |
| 363258 | 2020-04-22 12:36:00 | 0.064184 | 0.064183 | 0.064184 | 0.064182 | 0.000004 | 0.332343 | 0.329990 | 0.333567 | 0.555885 | 0.442321 | 0.0 | 0.331758 | 0.332473 | 0.334215 | 0.093103 | 0.134483 | 0.015156 |
363259 rows × 18 columns
train.index = pd.to_datetime(train.pop('timestamp'))
test.index = pd.to_datetime(test.pop('timestamp'))
train[::15].iplot(subplots=True)